<template>
    <div>
        <el-tag v-if="visit == apiRoute.PUBLIC" type="info" size="mini" effect="dark">{{apiAuthName[visit]}}</el-tag>
        <el-tag v-if="visit == apiRoute.LOGIN" size="mini" effect="dark">{{apiAuthName[visit]}}</el-tag>
        <el-tag v-if="visit == apiRoute.AUTH" type="warning" size="mini" effect="dark">{{apiAuthName[visit]}}</el-tag>
        <el-tag v-if="visit == apiRoute.SYSTEM" type="danger" size="mini" effect="dark">{{apiAuthName[visit]}}</el-tag>
    </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import ApiRoute, { ApiAuthName } from "../../lib/apiRoute/apiRoute";
/**
 * state 数据类型
 */
// interface IState {}
export default defineComponent({
    name: "ApiVisit",
    props: {
        visit: {
            type: Number,
            default: 0,
        },
    },
    setup() {
        return {
            apiRoute: ApiRoute,
            apiAuthName: ApiAuthName,
        };
    },
});
</script>

<style scoped lang="scss">
</style>